package com.etsii.android.servidor;


import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.MotionEvent;
import android.widget.TextView;

public class ServidorAgenciaActivity extends Activity {
    /** Called when the activity is first created. */
	//servidor_dinamico servidor;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.servidor);
        
        TextView texto = (TextView)findViewById(R.id.TextoServidor);
        texto.setTextColor(Color.rgb(0,255,0));
        
        Thread tservidor = new Thread(new servidor_dinamico(InitServidorActivity.puerto, InitServidorActivity.maxPlazas));
        tservidor.run();
    }
    
    /*@Override
    public boolean onTouchEvent(MotionEvent event) {
    	TextView tv = new TextView(this);
    	int i = 10;
        tv.setText("Numero de Casillas Visitadas : " + i);
        tv.append(" y algo masss jeje");
        tv.setTextSize(20);
        tv.setTextColor(Color.rgb(0,255,0));
        setContentView(tv);
        return true;
    }*/
    
    /*@Override
    public boolean onTouchEvent(MotionEvent event) {
    	TextView texto = (TextView)findViewById(R.id.TextoServidor);
    	//texto.clearComposingText();
    	//texto.setText(""); //clear
    	texto.append("\n texto añadido jaja" + InitServidorActivity.maxPlazas + InitServidorActivity.puerto);
        System.out.println("empieza servidor");
        servidor.run(); //ejecuta servidor
        System.out.println("termina servidor");
    	return true;
    }*/
    
}
